-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept x-data="true" as a synonym for x-data="{}" #3339
Conversation
As per alpinejs#3337, some frameworks (like htm) convert `<div x-data … />` to `<div x-data="true" … />` whereas Alpine.js currently only accepts `<div x-data="" … />`. This patch (as per alpinejs#3337 (reply in thread)), also makes it accept `x-data="true"` to mean data is `{}`.
Looks like it’s causing a UI component test to fail. Afaik those are closed-source, so I don’t think I can help with that. If someone with access to the source can take a look when they get a moment I’d appreciate it. Otherwise, if there’s anything else I can do, please do let me know. |
Technically the ui components are not closed source, they're right there in the repo under package/ui, but a few of them are flaky/incomplete, so if a quick look doesn't seem like this is related, then the ui tests can be ignored for now. |
Ah, so they’re not the Alpine UI Components from https://alpinejs.dev/components (that’s why I was confused; those have a commercial license and these are apparently under MIT but they’re both referred to as UI components under the Alpine name) :) (I’ll take a quick look to see what’s failing tomorrow.) |
Well, yes and no. The documentation for the headless components are all behind that, but the package itself is just right in the repo and npm, just no documentation for it. |
@aral the failing test is |
@aral thanks for the PR! Could you add a test for this? Thanks! |
@aral Caleb said to merge anyway! Thanks for the PR! |
As per #3337, some frameworks (like htm) convert
<div x-data … />
to<div x-data="true" … />
whereas Alpine.js currently only accepts the equivalent of<div x-data="" … />
. This patch (based on #3337 (reply in thread)), also makes it acceptx-data="true"
to mean data is{}
.